<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>统计图表</title>
    <link rel="stylesheet" href="../static/plugins/layui/css/layui.css">
</head>
<style>
    [carousel-item]:before {
        display: none
    }
</style>
<body class="layui-layout-body">

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
    <legend>统计图</legend>
</fieldset>


<div class="layui-container">

    <div class="layui-row layui-col-space5">
        <div class="layui-col-md6">

            <div class="layui-col-md12">
                <!--故障总时长-->
                <div class="layui-form">

                    <div class="layui-form-item" style="margin-left: 85px;">
                        <div class="layui-input-inline" style="width: 60px;">
                            <input type="checkbox" checked value="1" id="deviceFaultSumTimeType" lay-skin="switch"
                                   lay-filter="deviceFaultSumTimeType" lay-text="周|月">
                        </div>

                        <div class="layui-input-inline" id="deviceFaultTimeWeekDiv">
                            <input type="text" id="deviceFaultTimeWeek" placeholder="选择日期" autocomplete="off"
                                   class="layui-input">
                        </div>


                        <div class="layui-input-inline" id="deviceFaultTimeMonthDiv" style="display: none">
                            <input type="text" id="deviceFaultTimeMonth" placeholder="选择起始时间范围" autocomplete="off"
                                   class="layui-input">
                        </div>

                        <button class="layui-btn  layui-btn-normal" style="margin-left: 10px" lay-submit
                                lay-filter="deviceSumTimeSearch">
                            搜索
                        </button>
                    </div>
                </div>
                <!--设备故障时长-->
                <div id="deviceFaultSumTime" style="margin-top:5px;width: 565px;height:560px;"></div>
            </div>

            <div class="layui-col-md12">
                <!--故障时间超过两个小时次数最多的设备-->
                <div class="layui-form">

                    <div class="layui-form-item" style="margin-left: 85px;">
                        <div class="layui-input-inline" style="width: 60px;">
                            <input type="checkbox" checked value="1" id="deviceFaultOverTwoCountType" lay-skin="switch"
                                   lay-filter="deviceFaultOverTwoCountType" lay-text="周|月">
                        </div>

                        <div class="layui-input-inline" id="deviceFaultOverTwoCountWeekDiv">
                            <input type="text" id="deviceFaultOverTwoCountWeek" placeholder="选择日期" autocomplete="off"
                                   class="layui-input">
                        </div>


                        <div class="layui-input-inline" id="deviceFaultOverTwoCountMonthDiv" style="display: none">
                            <input type="text" id="deviceFaultOverTwoCountMonth" placeholder="选择起始时间范围" autocomplete="off"
                                   class="layui-input">
                        </div>

                        <button class="layui-btn  layui-btn-normal" style="margin-left: 10px" lay-submit
                                lay-filter="deviceOverTwoCountSearch">
                            搜索
                        </button>
                    </div>
                </div>
                <!--设备故障次数-->
                <div id="deviceFaultOverTwoCount" style="margin-top:5px;width: 565px;height:560px;"></div>
            </div>

        </div>

        <div class="layui-col-md6">

            <div class="layui-col-md12">
                <!--故障总次数-->
                <div class="layui-form">

                    <div class="layui-form-item" style="margin-left: 85px;">
                        <div class="layui-input-inline" style="width: 60px;">
                            <input type="checkbox" checked value="1" id="deviceFaultCountType" lay-skin="switch"
                                   lay-filter="deviceFaultSumCountType" lay-text="周|月">
                        </div>

                        <div class="layui-input-inline" id="deviceFaultCountWeekDiv">
                            <input type="text" id="deviceFaultCountWeek" placeholder="选择日期" autocomplete="off"
                                   class="layui-input">
                        </div>


                        <div class="layui-input-inline" id="deviceFaultCountMonthDiv" style="display: none">
                            <input type="text" id="deviceFaultCountMonth" placeholder="选择起始时间范围" autocomplete="off"
                                   class="layui-input">
                        </div>

                        <button class="layui-btn  layui-btn-normal" style="margin-left: 10px" lay-submit
                                lay-filter="deviceSumCountSearch">
                            搜索
                        </button>
                    </div>
                </div>
                <!--设备故障次数-->
                <div id="deviceFaultSumCount" style="margin-top:5px;width: 565px;height:560px;"></div>
            </div>

            <div class="layui-col-md12">
                <!--更换最多的配件-->
                <div class="layui-form">

                    <div class="layui-form-item" style="margin-left: 85px;">
                        <div class="layui-input-inline" style="width: 60px;">
                            <input type="checkbox" checked value="1" id="damageComponentCountType" lay-skin="switch"
                                   lay-filter="damageComponentCountType" lay-text="周|月">
                        </div>

                        <div class="layui-input-inline" id="damageComponentCountWeekDiv">
                            <input type="text" id="damageComponentCountWeek" placeholder="选择日期" autocomplete="off"
                                   class="layui-input">
                        </div>


                        <div class="layui-input-inline" id="damageComponentCountMonthDiv" style="display: none">
                            <input type="text" id="damageComponentCountMonth" placeholder="选择起始时间范围" autocomplete="off"
                                   class="layui-input">
                        </div>

                        <button class="layui-btn  layui-btn-normal" style="margin-left: 10px" lay-submit
                                lay-filter="damageComponentCountSearch">
                            搜索
                        </button>
                    </div>
                </div>
                <!--更换最多的配件-->
                <div id="damageComponentCount" style="margin-top:5px;width: 565px;height:560px;"></div>
            </div>

        </div>

        <!--<div class="layui-col-md6">-->
            <!--&lt;!&ndash;故障最多的部位&ndash;&gt;-->
            <!--<div class="layui-form">-->

                <!--<div class="layui-form-item" style="margin-left: 85px;">-->
                    <!--<div class="layui-input-inline" style="width: 60px;">-->
                        <!--<input type="checkbox" checked value="1" id="damagePartCountType" lay-skin="switch"-->
                               <!--lay-filter="damagePartCountType" lay-text="周|月">-->
                    <!--</div>-->

                    <!--<div class="layui-input-inline" id="damagePartCountWeekDiv">-->
                        <!--<input type="text" id="damagePartCountWeek" placeholder="选择日期" autocomplete="off"-->
                               <!--class="layui-input">-->
                    <!--</div>-->


                    <!--<div class="layui-input-inline" id="damagePartCountMonthDiv" style="display: none">-->
                        <!--<input type="text" id="damagePartCountMonth" placeholder="选择起始时间范围" autocomplete="off"-->
                               <!--class="layui-input">-->
                    <!--</div>-->

                    <!--<button class="layui-btn  layui-btn-normal" style="margin-left: 10px" lay-submit-->
                            <!--lay-filter="damagePartCountSearch">-->
                        <!--搜索-->
                    <!--</button>-->
                <!--</div>-->
            <!--</div>-->
            <!--&lt;!&ndash;故障最多的部位&ndash;&gt;-->
            <!--<div id="damagePartCount" style="margin-top:5px;width: 565px;height:560px;"></div>-->
        <!--</div>-->

    </div>

</div>

<script src="../static/plugins/layui/layui.js"></script>
<script src="../static/js/jquery-3.2.1.min.js"></script>
<script src="../static/plugins/echarts/echarts.js"></script>
<script src="../static/js/echartOption.js"></script>
<script src="../static/js/device.js"></script>
<script>

    layui.use(['form', 'laydate'], function () {
        var form = layui.form;
        var laydate = layui.laydate;

        var now = Date();
        var nowDateStr = JJZ.FormatDate(now, 'yyyy-MM-dd');
        var param = 'type=1&startTime=' + nowDateStr + '&endTime=';

        //设备时长(周)
        laydate.render({
            elem: '#deviceFaultTimeWeek' //指定元素
            , max: JJZ.getNowFormatDate()
            , format: 'yyyy-MM-dd'
        });

        //设备时长(月)
        laydate.render({
            elem: '#deviceFaultTimeMonth' //指定元素
            , type: 'month'
            ,range:true
            , max: JJZ.getNowFormatDate()
            , format: 'yyyyMM'
        });


        //发生故障时长 设备
        var deviceFaultSumTimeChart = echarts.init(document.getElementById('deviceFaultSumTime'));
        //初始化发生故障时长的统计图
        JJZ.requestData('/common/deviceFaultSumTimeChart', param, function (data) {
            var timeDataArr = [];
            var nameArr = [];
            $.each(data.records, function (index, value) {
                var temDateObj = {
                    tooltip: {
                        // formatter: '{b0}：<br> 发生故障总时长：{c0}'
                    }
                };
                var formatter = value.deviceName + '：<br> 发生故障总时长：{c0} 分钟!';
                temDateObj.tooltip.formatter = formatter;
                temDateObj.value = value.totalDuration;
                nameArr.push(value.deviceNumber);
                timeDataArr.push(temDateObj);
            });
            deviceFaultSumTimeChartOption.series[0].data = timeDataArr;
            deviceFaultSumTimeChartOption.xAxis.data = nameArr;
            deviceFaultSumTimeChart.setOption(deviceFaultSumTimeChartOption);
        });

        form.on('switch(deviceFaultSumTimeType)', function (data) {
            if (data.elem.checked) {
                $('#deviceFaultTimeWeekDiv').css('display', 'block');
                $('#deviceFaultTimeMonthDiv').css('display', 'none');
                $('#deviceFaultSumTimeType').val(1);
            } else {
                $('#deviceFaultTimeWeekDiv').css('display', 'none');
                $('#deviceFaultTimeMonthDiv').css('display', 'block');
                $('#deviceFaultSumTimeType').val(2);
            }
        });

        form.on('submit(deviceSumTimeSearch)', function (data) {
            var type = $('#deviceFaultSumTimeType').val();
            var param;
            if (type === '1') {
                var weekDate = $('#deviceFaultTimeWeek').val();
                if (weekDate && weekDate != '') {
                    param = 'type=1' + '&startTime=' + weekDate;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            } else {
                var time = $('#deviceFaultTimeMonth').val().replace(/\s*/g, "");
                if (time && time != '') {
                    var timeArr = time.split("-");
                    var startTime = timeArr[0];
                    var endTime = timeArr[1];
                    param = 'type=2' + '&startTime=' + startTime + '&endTime=' + endTime;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            }
            JJZ.requestData('/common/deviceFaultSumTimeChart', param, function (data) {
                var timeDataArr = [];
                var nameArr = [];
                $.each(data.records, function (index, value) {
                    var temDateObj = {
                        tooltip: {
                            // formatter: '{b0}：<br> 发生故障次数：{c0}'
                        }
                    };
                    var formatter = value.deviceName + '：<br> 发生故障总时长：{c0} 分钟!';
                    temDateObj.tooltip.formatter = formatter;
                    temDateObj.value = value.totalDuration;
                    nameArr.push(value.deviceNumber);
                    timeDataArr.push(temDateObj);
                });
                deviceFaultSumTimeChartOption.series[0].data = timeDataArr;
                deviceFaultSumTimeChartOption.xAxis.data = nameArr;
                deviceFaultSumTimeChart.setOption(deviceFaultSumTimeChartOption);
            });

            return false;
        });

        /*******************************************设备故障总次数开始**********************************************/

        //设备故障次数(周)
        laydate.render({
            elem: '#deviceFaultCountWeek' //指定元素
            , max: JJZ.getNowFormatDate()
            , format: 'yyyy-MM-dd'
        });

        //设备故障次数(月)
        laydate.render({
            elem: '#deviceFaultCountMonth' //指定元素
            , type: 'month'
            ,range:true
            , max: JJZ.getNowFormatDate()
            , format: 'yyyyMM'
        });


        //发生故障次数 设备
        var deviceFaultSumCountChart = echarts.init(document.getElementById('deviceFaultSumCount'));
        //初始化发生故障总次数的统计图
        JJZ.requestData('/common/deviceFaultCountChart', param, function (data) {
            var countArr = [];
            var nameArr = [];
            $.each(data.records, function (index, value) {
                var temDateObj = {
                    tooltip: {
                        // formatter: '{b0}：<br> 发生故障总时长：{c0}'
                    }
                };
                var formatter = value.deviceName + '：<br> 发生故障总次数：{c0} 次!';
                temDateObj.tooltip.formatter = formatter;
                temDateObj.value = value.count;
                nameArr.push(value.deviceNumber);
                countArr.push(temDateObj);
            });
            deviceFaultCountChartOption.series[0].data = countArr;
            deviceFaultCountChartOption.xAxis.data = nameArr;
            deviceFaultSumCountChart.setOption(deviceFaultCountChartOption);
        });

        form.on('switch(deviceFaultSumCountType)', function (data) {
            if (data.elem.checked) {
                $('#deviceFaultCountWeekDiv').css('display', 'block');
                $('#deviceFaultCountMonthDiv').css('display', 'none');
                $('#deviceFaultCountType').val(1);
            } else {
                $('#deviceFaultCountWeekDiv').css('display', 'none');
                $('#deviceFaultCountMonthDiv').css('display', 'block');
                $('#deviceFaultCountType').val(2);
            }
        });

        form.on('submit(deviceSumCountSearch)', function (data) {
            var type = $('#deviceFaultCountType').val();
            var param;
            if (type === '1') {
                var weekDate = $('#deviceFaultCountWeek').val();
                if (weekDate && weekDate != '') {
                    param = 'type=1' + '&startTime=' + weekDate;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            } else {
                var time = $('#deviceFaultCountMonth').val().replace(/\s*/g, "");
                if (time && time != '') {
                    var timeArr = time.split("-");
                    var startTime = timeArr[0];
                    var endTime = timeArr[1];
                    param = 'type=2' + '&startTime=' + startTime + '&endTime=' + endTime;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            }
            JJZ.requestData('/common/deviceFaultCountChart', param, function (data) {
                var countArr = [];
                var nameArr = [];
                $.each(data.records, function (index, value) {
                    var temDateObj = {
                        tooltip: {
                            // formatter: '{b0}：<br> 发生故障次数：{c0}'
                        }
                    };
                    var formatter = value.deviceName + '：<br> 发生故障总次数：{c0} 次!';
                    temDateObj.tooltip.formatter = formatter;
                    temDateObj.value = value.count;
                    nameArr.push(value.deviceNumber);
                    countArr.push(temDateObj);
                });
                deviceFaultCountChartOption.series[0].data = countArr;
                deviceFaultCountChartOption.xAxis.data = nameArr;
                deviceFaultSumCountChart.setOption(deviceFaultCountChartOption);
            });
            return false;
        });
        /**********************************************故障时间超过两个小时次数最多的设备****************************************************/


        //设备故障时间超过两小时次数(周)
        laydate.render({
            elem: '#deviceFaultOverTwoCountWeek' //指定元素
            , max: JJZ.getNowFormatDate()
            , format: 'yyyy-MM-dd'
        });

        //设备故障时间超过两小时次数(月)
        laydate.render({
            elem: '#deviceFaultOverTwoCountMonth' //指定元素
            , type: 'month'
            ,range:true
            , max: JJZ.getNowFormatDate()
            , format: 'yyyyMM'
        });


        //发生故障次数 设备
        var deviceFaultOverTwoCountChart = echarts.init(document.getElementById('deviceFaultOverTwoCount'));
        //初始化故障超过两小时次数的统计图
        JJZ.requestData('/common/deviceFaultOverTwoCountChart', param, function (data) {
            var countArr = [];
            var nameArr = [];
            $.each(data.records, function (index, value) {
                var temDateObj = {
                    tooltip: {
                        // formatter: '{b0}：<br> 发生故障总时长：{c0}'
                    }
                };
                var formatter = value.deviceName + '：<br> 故障时间超过两小时总次数：{c0} 次!';
                temDateObj.tooltip.formatter = formatter;
                temDateObj.value = value.count;
                nameArr.push(value.deviceNumber);
                countArr.push(temDateObj);
            });
            deviceOverTwoCountChartOption.series[0].data = countArr;
            deviceOverTwoCountChartOption.xAxis.data = nameArr;
            deviceFaultOverTwoCountChart.setOption(deviceOverTwoCountChartOption);
        });

        form.on('switch(deviceFaultOverTwoCountType)', function (data) {
            if (data.elem.checked) {
                $('#deviceFaultOverTwoCountWeekDiv').css('display', 'block');
                $('#deviceFaultOverTwoCountMonthDiv').css('display', 'none');
                $('#deviceFaultOverTwoCountType').val(1);
            } else {
                $('#deviceFaultOverTwoCountWeekDiv').css('display', 'none');
                $('#deviceFaultOverTwoCountMonthDiv').css('display', 'block');
                $('#deviceFaultOverTwoCountType').val(2);
            }
        });

        form.on('submit(deviceOverTwoCountSearch)', function (data) {
            var type = $('#deviceFaultOverTwoCountType').val();
            var param;
            if (type === '1') {
                var weekDate = $('#deviceFaultOverTwoCountWeek').val();
                if (weekDate && weekDate != '') {
                    param = 'type=1' + '&startTime=' + weekDate;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            } else {
                var time = $('#deviceFaultOverTwoCountMonth').val().replace(/\s*/g, "");
                if (time && time != '') {
                    var timeArr = time.split("-");
                    var startTime = timeArr[0];
                    var endTime = timeArr[1];
                    param = 'type=2' + '&startTime=' + startTime + '&endTime=' + endTime;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            }
            JJZ.requestData('/common/deviceFaultOverTwoCountChart', param, function (data) {
                var countArr = [];
                var nameArr = [];
                $.each(data.records, function (index, value) {
                    var temDateObj = {
                        tooltip: {
                            // formatter: '{b0}：<br> 发生故障次数：{c0}'
                        }
                    };
                    var formatter = value.deviceName + '：<br> 故障时间超过两小时总次数：{c0} 次!';
                    temDateObj.tooltip.formatter = formatter;
                    temDateObj.value = value.count;
                    nameArr.push(value.deviceNumber);
                    countArr.push(temDateObj);
                });
                deviceOverTwoCountChartOption.series[0].data = countArr;
                deviceOverTwoCountChartOption.xAxis.data = nameArr;
                deviceFaultOverTwoCountChart.setOption(deviceOverTwoCountChartOption);
            });
            return false;
        });

        /********************************************故障次数最多的部位********************************************************/

        //部位发生故障次数(周)
        // laydate.render({
        //     elem: '#damagePartCountWeek' //指定元素
        //     , max: JJZ.getNowFormatDate()
        //     , format: 'yyyy-MM-dd'
        // });

        //部位发生故障次数(月)
        // laydate.render({
        //     elem: '#damagePartCountMonth' //指定元素
        //     , type: 'month'
        //     ,range:true
        //     , max: JJZ.getNowFormatDate()
        //     , format: 'yyyyMM'
        // });


        //部位发生故障次数
        // var damagePartCountChart = echarts.init(document.getElementById('damagePartCount'));
        //初始化部位故障次数最多的统计图
        // JJZ.requestData('/common/damagePartCountChart', param, function (data) {
        //     var countArr = [];
        //     var nameArr = [];
        //     $.each(data.records, function (index, value) {
        //         var temDateObj = {
        //             tooltip: {
        //                 formatter: '{b0}：<br> 发生故障次数：{c0} 次!'
        //             }
        //         };
        //         temDateObj.value = value.count;
        //         nameArr.push(value.partName);
        //         countArr.push(temDateObj);
        //     });
        //     damagePartChartOption.series[0].data = countArr;
        //     damagePartChartOption.xAxis.data = nameArr;
        //     damagePartCountChart.setOption(damagePartChartOption);
        // });

        // form.on('switch(damagePartCountType)', function (data) {
        //     if (data.elem.checked) {
        //         $('#damagePartCountWeekDiv').css('display', 'block');
        //         $('#damagePartCountMonthDiv').css('display', 'none');
        //         $('#damagePartCountType').val(1);
        //     } else {
        //         $('#damagePartCountWeekDiv').css('display', 'none');
        //         $('#damagePartCountMonthDiv').css('display', 'block');
        //         $('#damagePartCountType').val(2);
        //     }
        // });
        //
        // form.on('submit(damagePartCountSearch)', function (data) {
        //     var type = $('#damagePartCountType').val();
        //     var param;
        //     if (type === '1') {
        //         var weekDate = $('#damagePartCountWeek').val();
        //         if (weekDate && weekDate != '') {
        //             param = 'type=1' + '&startTime=' + weekDate;
        //         } else {
        //             layer.msg('参数错误');
        //             return false;
        //         }
        //     } else {
        //         var time = $('#damagePartCountMonth').val().replace(/\s*/g, "");
        //         if (time && time != '') {
        //             var timeArr = time.split("-");
        //             var startTime = timeArr[0];
        //             var endTime = timeArr[1];
        //             param = 'type=2' + '&startTime=' + startTime + '&endTime=' + endTime;
        //         } else {
        //             layer.msg('参数错误');
        //             return false;
        //         }
        //     }
        //     JJZ.requestData('/common/damagePartCountChart', param, function (data) {
        //         var countArr = [];
        //         var nameArr = [];
        //         $.each(data.records, function (index, value) {
        //             var temDateObj = {
        //                 tooltip: {
        //                      formatter: '{b0}：<br> 发生故障次数：{c0} 次!'
        //                 }
        //             };
        //             temDateObj.value = value.count;
        //             nameArr.push(value.partName);
        //             countArr.push(temDateObj);
        //         });
        //         damagePartChartOption.series[0].data = countArr;
        //         damagePartChartOption.xAxis.data = nameArr;
        //         damagePartCountChart.setOption(damagePartChartOption);
        //     });
        //     return false;
        // });

        /*************************************************更换最多的配件*****************************************************/


        //更换最多的配件(周)
        laydate.render({
            elem: '#damageComponentCountWeek' //指定元素
            , max: JJZ.getNowFormatDate()
            , format: 'yyyy-MM-dd'
        });

        //更换最多的配件(月)
        laydate.render({
            elem: '#damageComponentCountMonth' //指定元素
            , type: 'month'
            ,range:true
            , max: JJZ.getNowFormatDate()
            , format: 'yyyyMM'
        });


        //部位发生故障次数
        var damageComponentCountChart = echarts.init(document.getElementById('damageComponentCount'));
        //初始化部位故障次数最多的统计图
        JJZ.requestData('/common/damageComponentCountChart', param, function (data) {
            var countArr = [];
            var nameArr = [];
            $.each(data.records, function (index, value) {
                var temDateObj = {
                    tooltip: {
                        formatter: '{b0}：<br> 更换次数：{c0} 次!'
                    }
                };
                temDateObj.value = value.count;
                nameArr.push(value.componentName);
                countArr.push(temDateObj);
            });
            damageComponentChartOption.series[0].data = countArr;
            damageComponentChartOption.xAxis.data = nameArr;
            damageComponentCountChart.setOption(damageComponentChartOption);
        });

        form.on('switch(damageComponentCountType)', function (data) {
            if (data.elem.checked) {
                $('#damageComponentCountWeekDiv').css('display', 'block');
                $('#damageComponentCountMonthDiv').css('display', 'none');
                $('#damageComponentCountType').val(1);
            } else {
                $('#damageComponentCountWeekDiv').css('display', 'none');
                $('#damageComponentCountMonthDiv').css('display', 'block');
                $('#damageComponentCountType').val(2);
            }
        });

        form.on('submit(damageComponentCountSearch)', function (data) {
            var type = $('#damageComponentCountType').val();
            var param;
            if (type === '1') {
                var weekDate = $('#damageComponentCountWeek').val();
                if (weekDate && weekDate != '') {
                    param = 'type=1' + '&startTime=' + weekDate;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            } else {
                var time = $('#damageComponentCountMonth').val().replace(/\s*/g, "");
                if (time && time != '') {
                    var timeArr = time.split("-");
                    var startTime = timeArr[0];
                    var endTime = timeArr[1];
                    param = 'type=2' + '&startTime=' + startTime + '&endTime=' + endTime;
                } else {
                    layer.msg('参数错误');
                    return false;
                }
            }
            JJZ.requestData('/common/damageComponentCountChart', param, function (data) {
                var countArr = [];
                var nameArr = [];
                $.each(data.records, function (index, value) {
                    var temDateObj = {
                        tooltip: {
                            formatter: '{b0}：<br> 更换次数：{c0} 次!'
                        }
                    };
                    temDateObj.value = value.count;
                    nameArr.push(value.componentName);
                    countArr.push(temDateObj);
                });
                damageComponentChartOption.series[0].data = countArr;
                damageComponentChartOption.xAxis.data = nameArr;
                damageComponentCountChart.setOption(damageComponentChartOption);
            });
            return false;
        });


    });
</script>
</body>
</html>